package entities;

import java.io.Serializable;

public class ExecutionStage implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Long ticketId;
	private User leader;

	private String durationDate;                   // once the inspector approved the duration time its being calculated to a date
	private String durationApproveDate;            // date the inspector approved the requested time length requested by the evaluator
	private String completeDate;                   // date in which the execution stage has completed
	private Integer durationDays;                  // due date for the evaluation stage, requested by the evaluator

	
	public ExecutionStage() {
		
	}

	/**
	 * Returns the ticket's serial number
	 * @return
	 */
	public Long getTicketId() {
		return ticketId;
	}

	/**
	 * Set the ticket's serial number
	 * @param ticketId
	 */
	public void setTicketId(Long ticketId) {
		this.ticketId = ticketId;
	}

	/**
	 * Returns the leader's stage details
	 * @return
	 */
	public User getLeader() {
		return leader;
	}

	/**
	 * Set the leader's stage details
	 * @param leader
	 */
	public void setLeader(User leader) {
		this.leader = leader;
	}

	/**
	 * Returns the execution stage duration date
	 * @return
	 */
	public String getDurationDate() {
		return durationDate;
	}

	/**
	 * Set the execution stage duration date
	 * @param durationDate
	 */
	public void setDurationDate(String durationDate) {
		if(durationDate == null)
			this.durationDate = "";
		else
			this.durationDate = durationDate;
	}

	/**
	 * Returns the date of the requested time length requested by the evaluator the inspector approved
	 * @return
	 */
	public String getDurationApproveDate() {
		return durationApproveDate;
	}

	/**
	 * Set the date of the requested time length requested by the evaluator the inspector approved
	 * @param durationApproveDate
	 */
	public void setDurationApproveDate(String durationApproveDate) {
		if(durationApproveDate == null)
			this.durationApproveDate = "";
		else
			this.durationApproveDate = durationApproveDate;
	}

	/**
	 * Returns the date the execution stage completed at
	 * @return
	 */
	public String getCompleteDate() {
		return completeDate;
	}

	/**
	 * Set the date the execution stage completed at
	 * @param completeDate
	 */
	public void setCompleteDate(String completeDate) {
		if(completeDate == null)
			this.completeDate = "";
		else
			this.completeDate = completeDate;
	}

	/**
	 * Returns the due date for the execution stage, requested by the evaluator
	 * @return
	 */
	public Integer getDurationDays() {
		return durationDays;
	}

	/**
	 * Set the due date for the evaluation stage, requested by the evaluator
	 * @param days
	 */
	public void setDurationDays(Integer days) {
		if(days == null)
			this.durationDays = 0;
		else
			this.durationDays = days;
	}

}
